/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const deviceRouter = {
  path: '/device',
  component: Layout,
  // redirect: 'noRedirect',
  redirect: '/device/my-device',
  name: 'Table',
  meta: {
    roles: ['editor', 'admin'],
    title: '设备管理',
    icon: 'list'
  },
  children: [
    {
      path: 'my-device',
      name: 'MyDevice',
      component: () => import('@/views/device/my-device'),
      meta: {
        roles: ['editor', 'admin'],
        title: '我的设备',
        affix: true,
        breadcrumb: false
      }
    },
    {
      path: 'device-quota-alarm',
      component: () => import('@/views/device/device-quota-alarm'),
      name: 'DeviceQuotaAlarm',
      meta: {
        title: '设备指标报警',
        noCache: true,
        affix: true,
        breadcrumb: false
      }
    }

    // {
    //   path: 'list',
    //   component: () => import('@/views/device/list-device'),
    //   name: 'ListDevice',
    //   meta: {
    //     title: '展示设备',
    //     icon: 'list',
    //     noCache: true,
    //     affix: true,
    //     breadcrumb: false
    //   }
    // }
  ]
}
export default deviceRouter
